//
//  HEHealthDetailRanderModel.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/12/8.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEHealthDetailRanderModel.h"

@implementation HEHealthDetailRanderModel

- (NSArray<HEHealthDetailPramaModel *> *)healthParams {
    if (!_healthParams) {
        NSArray *arr = [DYTools getContainersObjectFromJsonString: _health_params];
        
        _healthParams = [HEHealthDetailPramaModel mj_objectArrayWithKeyValuesArray:arr];
    }
    return _healthParams;
}
 
- (NSArray<HEHealthNodeModel *> *)healthNode {
    if (!_healthNode) {
        NSArray *arr = [DYTools getContainersObjectFromJsonString: _health_node];
        _healthNode = [HEHealthNodeModel mj_objectArrayWithKeyValuesArray:arr];
    }
    return _healthNode;
}

@end

@implementation HEHealthDetailPramaModel

+ (NSDictionary *)mj_objectClassInArray{
    return @{@"list" : [HEHealthNodeModel class]};
}

@end 



@implementation HEHealthNodeModel

- (UIColor *)socerColor {
    if (!_socerColor) {
        if (self.health_value.floatValue >= self.avg_value.floatValue) {
            _socerColor = CNavBgColor;
        }else {
            _socerColor = CPriceColor;
        }
    }
    return _socerColor;
}

@end 
